package com.itheima.kebian;

import java.util.*;

public class Demo02 {

    public static void main(String[] args) {
        List<String> list = List.of("坤坤", "签签", "滔滔", "小鹿");
        ArrayList arrayList = new ArrayList(list);
        Set<String> set = Set.of("坤坤5", "坤坤2", "坤坤4", "坤坤1");
        //HashSet<String> set2 = new HashSet<>(set);
        TreeSet<String> ts = new TreeSet<>(set);
        System.out.println(ts);


        Map<String, Integer> map = Map.of("坤坤", 29, "签签", 31);
        System.out.println(map);
        HashMap<String, Integer> map2 = new HashMap<>(map);
        System.out.println(map2);

        Map.Entry<String, String> entry = Map.entry("山西", "太原");
        Map.Entry<String, String> entry2 = Map.entry("陕西", "西安");
        Map<String, String> map3 = Map.ofEntries(entry, entry2);

        System.out.println(map3);

    }
}
